import Search from '../views/Search';
import Detail from '@/views/Detail';
import AddCartSuccess from '@/views/AddCartSuccess';
import ShopCart from '@/views/ShopCart';
import Trade from '@/views/Trade'
import Pay from '@/views/Pay'
import PaySuccess from '@/views/PaySuccess'
import Center from '@/views/Center'

export default [
  {
    path: '/',
    redirect: '/home',
  },
  {
    name: 'home',
    path: '/home',
    component: () => import('@/views/Home'),
    meta: { isShowNav: true },
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/Login'),
    meta: { isHiddenFooter: true },
  },
  {
    name: 'register',
    path: '/register',
    component: () => import('@/views/Register'),
    meta: { isHiddenFooter: true },
  },
  { name: 'search', path: '/search', component: Search },
  { name: 'detail', path: '/detail/:id?', component: Detail, props: true },
  {
    name: 'addCartSuccess',
    path: '/addCartSuccess',
    component: AddCartSuccess,
  },
  {
    name: 'shopCart',
    path: '/shopCart',
    component: ShopCart,
  },
  {
    name: 'trade',
    path: '/trade',
    component: Trade,
  },
  {
    name: 'center',
    path: '/center',
    component: Center,
  },
  {
    name: 'paysuccess',
    path: '/paysuccess',
    component: PaySuccess,
  },
  {
    name: 'pay',
    path: '/pay',
    component: Pay,
  },
];
